﻿@using ZoomLa.AppCode.Controls
@model ZoomLa.Model.M_ExTeacher
@{

}
@section head{
    <script type="text/javascript" src="/Plugins/Ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="/Plugins/Ueditor/ueditor.all.min.js"></script>
    <title>添加教师</title>
}
@section content{
    <div id="BreadDiv" class="container-fluid mysite">
        <div class="row">
            <ol id="BreadNav" class="breadcrumb navbar-fixed-top">
                <li><a href='@(CustomerPageAction.customPath2)I/Main.aspx'>工作台</a></li>
                <li><a href='Papers_System_Manage'>教育模块</a></li>
                <li><a href='ExTeacherManage'>培训资源库</a></li>
                <li><a href='ExTeacherManage'>教师管理</a></li>
                <li>@(Model.ID > 0 ? "修改教师" : "添加教师")</li>
            </ol>
        </div>
    </div>
    <form method="post" action="@MVCHelper.GetAction("Teacher_Add",Request)">
        <table class="table table-striped table-bordered table-hover">
            <tbody id="Tabs0">
                <tr>
                    <td class="tdbgleft" style="width: 10%" align="right">教师名称：</td>
                    <td class="bqright">
                        @Html.TextBoxFor(m => m.TName, new { @class = "form-control text_md" })
                    </td>
                </tr>
                <tr>
                    <td class="tdbgleft" align="right">教师职位：</td>
                    <td class="bqright">
                        @Html.TextBoxFor(m => m.Post, new { @class = "form-control text_md" })
                    </td>
                </tr>
                <tr>
                    <td class="tdbgleft" style="width: 10%" align="right">授课科目：</td>
                    <td class="bqright">
                        @Html.Partial("C_TreeTlpDP", (C_TreeTlpDP)ViewBag.treeMod)
                    </td>
                </tr>
                <tr>
                    <td class="tdbgleft" align="right">授课名称：</td>
                    <td class="bqright">
                        @Html.TextBoxFor(m => m.Teach, new { @class = "form-control text_md" })
                    </td>
                </tr>
                <tr>
                    <td class="tdbgleft" align="right">教师信息：</td>
                    <td>
                        @Html.TextAreaFor(m => m.Remark, new { @style = "width:700px;height:200px;" })
                    </td>
                </tr>
            </tbody>
            <tr class="tdbgbottom">
                <td colspan="2">
                    <button type="submit" class="btn btn-primary">保存</button>
                    <button type="button" class="btn btn-primary" onclick="location.href = 'ExTeacherManage';">返回列表</button>
                </td>
            </tr>
        </table>
    </form>
}
@section script{
    <script type="text/javascript" src="/JS/Dialog.js"></script>
    @MvcHtmlString.Create(Call.GetUEditor("Remark", 2))
    <script type="text/javascript">
        $(function () {
            $("form").validate({
                rules: {
                    TName: { required: true },
                    Teach: { required: true }
                },
                messages: {
                    TName: { required: "教师名称不能为空" },
                    Teach: { required: "授课信息不能为空" }
                },
            });
        });
    </script>
}
